Function.prototype.callfinal=function(context){
    var context=context||window;
    context.fn=this;
    var args=[];
    for(let i=1;i<arguments.length;i++){
        args.push('arguments['+i+']');
    }
    var result=eval('context.fn('+args+')')
    delete context.fn
    return result;
}
var value=2;
var foo={
    value:1
}
function bar(name,age){
    console.log(this.value)
    return{
        value:this.value,
        name,
        age
    }
}
// console.log(bar.callfinal(null))
console.log(bar.callfinal(foo,'zhan',11))